package com.oracle.sbdb.testother;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.sql.Date;
import java.util.HashSet;

import org.junit.Test;

public class TestOther {

//	@Test
	public void testDate() {
		Date date = new Date(System.currentTimeMillis());
//		System.out.println(date.toGMTString());
		Date date1 = Date.valueOf(date.toGMTString());
		System.out.println(date1 == null);
	}
	
	@Test
	public void processStops() throws IOException {
		File iFile = new File("D:\\stops.txt");
		FileInputStream in = new FileInputStream(iFile);
		InputStreamReader isr = new InputStreamReader(in);
		BufferedReader br = new BufferedReader(isr);
		StringBuffer sb = new StringBuffer();
		String line = null;
		while((line = br.readLine()) != null){
			sb.append("set.add(\""+line+"\");\r\n");
		}
		File outFile = new File("D:\\stops-out.txt");
		FileWriter writer = new FileWriter(outFile);
		writer.write(sb.toString());
		writer.close();
	}

}
